#ifndef __MOVEDOWN__
#define __MOVEDOWN__

#include <cocos2d.h>
#include "Model/Tree.h"
#include "Model/Monkey.h"

class MoveDown : public CCComponent
{

private:
	Tree* parent;
	int iii111;
	int mXAdd;
	Monkey* mMonkey;
public:
	MoveDown();
	MoveDown(Monkey* monkey);

	int arr_obstructions[kMaxLenght];

	int add_count;


	/// run action move down
	///
	/// @author : tdphuoc
	/// time_create: 04/07/2014
	/// time_end: 04/07/2014
	void fActionMoveDown();

	/// add more tree 
	///
	/// @author : tdphuoc
	/// time_create: 04/07/2014
	/// time_end: 04/07/2014
	void fActionAddBodyTree();

	/// Ham tao ra mang random gia tri tu 1-10
	/// Bien 1 : mang kieu int
	///
	/// @author : HM QUAN
	/// time_create: 02/07/2014
	/// time_end: 02/07/2014
	void fRandomArray(int *arr);

	virtual void update(float dt);

	void fAddFruit(CCPoint p);

	void fAddBough(CCPoint p);

	void fAddEnemy(CCPoint p);
		
	
};

#endif

#ifndef __REMOVEWHENDOWN__
#define __REMOVEWHENDOWN__

class RemoveWhenDown : public CCComponent
{
private:
	CCSprite * parent;
	int isFinish;
public:
	RemoveWhenDown();
	RemoveWhenDown(int type);

	virtual void update(float dt);

};

#endif 